﻿<%@ Page Title="" Language="C#" MasterPageFile="~/InnerInfo/InnerMaster.Master" AutoEventWireup="true" CodeBehind="InnerInfoProcessing.aspx.cs" 
	Inherits="QuaManSys.InnerInfo.InnerInfoProcessing"%>
<%@ Import Namespace="QuaManSys" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="Stylesheet" type="text/css" href="../Css/QuaInfoPro.css" />
	<link rel="Stylesheet" type="text/css" href="../Css/Search.css" media="screen" />
	<script language="javascript" type="text/javascript" src="../js/upload.js"></script>
	<link href="../Css/QuaInfoFd.css" rel="stylesheet" type="text/css" />
	<script language="javascript" type="text/javascript" src="../js/upload.js"></script>
	<script language="javascript" type="text/javascript" src="../Calendar/WdatePicker.js"></script>
	<script language="javascript" type="text/javascript" src="../CheckBox/checkBoxFunction.js"></script>
	
	<script  type="text/javascript">
		
		function checkTime() {
			var fbkt = document.getElementById("<%=txtProDL.ClientID %>").value;
			
			if (fbkt == null || fbkt == "") { alert("请输入处理时限"); return false; }
			
			return true;
		}
		
		function checkDate() {
			var fbkt = document.getElementById("<%=txtProDate.ClientID %>").value;

			if (fbkt == null || fbkt == "") { alert("请输入处理日期"); return false; }

			return true;
		}
		function chewww_zzjs_netValidate1(check) {

			if (check) {
				var fbkt2 = document.getElementById("<%=CheckBox2.ClientID%>");
				fbkt2.checked = false;
			}
		}
		function chewww_zzjs_netValidate2(check) {
			if (check) {
				var fbkt = document.getElementById("<%=CheckBox1.ClientID%>");
				fbkt.checked = false;
			}
		}	   
	</script>

	<script type="text/javascript">
		function submitQuaInfo() {

		}
	</script>

	<script type="text/javascript">
		function checkTime() {
			var fbkt = document.getElementById("<%=txtProDL.ClientID%>").value;

			if (fbkt == null || fbkt == "") { alert("请输入时间"); return false; }
			else
				return confirm("提交后您的信息将不能修改，确认提交？");
		}
	</script>

	<script type="text/javascript">
		function decideFocus() {
			var fbkt = document.getElementById("<%=DDLDepRes.ClientID%>").value;
			if (fbkt == null || fbkt == "") { alert("请输入关注部门"); return false; }
			else {
				return true;
			}
		}
	</script>
	
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphInner" runat="server">
    <div id="keyWordsDiv" style="border: 2px solid #6FA1D9; display: none; position: absolute;
		top: 0px; left: 0px; width: 260px; height:auto; z-index: 3; background-color: #EAF1FD;">
		<div style="width: 260px; height: 20px; background-color: #6FA1D9">
			<ul style="cursor: pointer; line-height: 20px;">
				<li style="float: left" onclick="getCheckVale('<%=cblKeyWords.ClientID %>', '<%=txtDeptFoc.ClientID %>')">[确定]</li>
				<li style="float: right" onclick="closeSelf('<%=cblKeyWords.ClientID %>')">[关闭]</li>
			</ul>
		</div>
		<div>
			<asp:CheckBoxList ID="cblKeyWords" runat="server" RepeatColumns="2" style="width:260px">
			</asp:CheckBoxList>
		</div>
	</div>
	
	<div class="MainDetail">
	
		<table border="1" cellspacing="0" cellpadding="0" width="700px">
			<caption><asp:Label id="lblInfoProTab" style="font-size: 20px; background-color:#ffffff; font-weight:bold;" runat="Server">质量信息处理表</asp:Label></caption>
			<tr class="noline">
				<td>编号：</td>
				<td><asp:Label ID="lblInfoNo"  runat="server" Text="[显示编号]"></asp:Label></td>
				<td></td>
				<td></td>
				<td></td>
				<td><asp:Label ID="lblState"  runat="server" Text="登记"></asp:Label></td>
			</tr> 
			<asp:Panel ID="PnlMainInfo" runat="server">
				   
			<tr>
				<td>信息来源</td>
				<td colspan="3">
					<asp:DropDownList ID="DDLInfoCla" runat="server" class="mytd">
						<asp:ListItem>试车服务通讯会</asp:ListItem>
						<asp:ListItem>公司质量例会</asp:ListItem>
						<asp:ListItem>内审</asp:ListItem>
						<asp:ListItem>一级质量监督</asp:ListItem>
						<asp:ListItem>产品质量报告</asp:ListItem>
					</asp:DropDownList>
				</td>
				<td>重要级别</td>
				<td>
					<asp:DropDownList ID="DDLImpLev" runat="server" class="mytd">
						<asp:ListItem>高</asp:ListItem>
						<asp:ListItem>中</asp:ListItem>
						<asp:ListItem>低</asp:ListItem>
					</asp:DropDownList>
				</td>
			</tr>
			<tr>
				<td>机型</td>
				<td><asp:Label ID="txtMacTyp" runat="server"></asp:Label></td>
				<td>机号</td>
				<td><asp:Label ID="txtMacNo" runat="server"></asp:Label></td>
				<td>工程编号</td>
				<td><asp:DropDownList ID="ddlProNo" runat="server" class="mytd"  
					 OnSelectedIndexChanged="ddlProNo_SelectedIndexChanged"	AutoPostBack="True"></asp:DropDownList>
						</td>
			</tr>
			<tr>
				<td>零部件</td>
				<td colspan="3"><asp:TextBox ID="txtComponent" runat="server" class="mytd"></asp:TextBox></td>
				<td>故障类型</td>
				<td><asp:TextBox ID="txtFaiTyp" runat="server" class="mytd" Height="21px"></asp:TextBox></td>
			</tr>
			<tr>
				<td>生产厂家</td>
				<td colspan="5"><asp:TextBox ID="txtManufac" runat="server" class="mytd"></asp:TextBox></td>
			</tr>
			<tr>
				<td>项目分类</td>
				<td colspan="2"><asp:TextBox ID="txtPjCls" runat="server" class="mytd"></asp:TextBox></td>
				<td>名称</td>
				<td colspan="2"><asp:TextBox ID="txtPjNam" runat="server" class="mytd"></asp:TextBox></td>
			</tr>
			<tr>
				<td>责任部门</td>
				<td colspan="2">
					<asp:DropDownList ID="DDLDepRes" runat="server" class="mytd" 
						OnSelectedIndexChanged="ResponDept_SelectedIndexChanged" AutoPostBack="True">
					</asp:DropDownList>
				</td>
				<td>处理时限</td>
				<td colspan="2"><asp:TextBox ID="txtProDL" runat="server" cssclass="Wdate" style="margin-left:0;margin-right:0; width:100%" onClick="WdatePicker()" ></asp:TextBox></td>
			</tr>
			<tr>
				<td>关注部门</td>
				<td colspan="5">
					<asp:TextBox ID="txtDeptFoc" runat="server" onclick="locking(this)" 
						OnClientClick="return decideFocus()" class="mytd"></asp:TextBox>
				</td>
			</tr>
			<tr>
				<td>顾客方联系人</td>
				<td colspan="2"><asp:TextBox ID="txtCustomer" runat="server" class="mytd"></asp:TextBox></td>
				<td>联系电话</td>
				<td colspan="2"><asp:TextBox ID="txtCusTel" runat="server" class="mytd"></asp:TextBox></td>
			</tr>
			<tr>
				<td>特别要求</td>
				<td colspan="5"><asp:TextBox id="txtSpeReq" runat="server" TextMode="MultiLine" class="mytd"></asp:TextBox></td>
			</tr>
			<tr>
				<td>描述</td>
				<td colspan="5"><asp:TextBox id="txtInfoDsc" runat="server" TextMode="MultiLine" class="mytd"></asp:TextBox></td>
			</tr>
			<tr>
				<td>信息分类</td>
				<td colspan="5">
					<asp:CheckBox ID="CheckBox1" name="CheckBox1" runat="server" Text="已处理（需后继关注）"  onclick="chewww_zzjs_netValidate1(this.checked)"  />
					<asp:CheckBox ID="CheckBox2" name="CheckBox2"  runat="server" Text="未处理（需跟踪解决）" onClick="chewww_zzjs_netValidate2(this.checked)" /> 
				</td>
			</tr>			
			<tr>
				<td>处理要求和意见</td>
				<td colspan="5"><asp:TextBox id="txtReqAdv" runat="server" TextMode=
					"MultiLine" class="mytd"></asp:TextBox></td>
			</tr>
			</asp:Panel> 
			<tr>
				<td>登记人</td>
				<td><asp:Label ID="txtInfoWrt" runat="server"></asp:Label></td>
				<td>部门</td>
				<td><asp:Label ID="txtInfoDep" runat="server"></asp:Label></td>
				<td>登记日期</td>
				<td><asp:Label ID="txtWrtDat" runat="server"></asp:Label></td>
			</tr>

			<asp:Panel ID="pnlRslEva" runat="server" Visible="false">
				<tr>
					<td>信息处理结果</td>
					<td colspan="5"><asp:TextBox id="txtReqRsl" runat="server" TextMode="MultiLine" class="mytd"></asp:TextBox></td>
				</tr>
				<tr>
					<td>质量信息处理评价</td>
					<td colspan="5"><asp:TextBox id="txtProCmm" runat="server" TextMode="MultiLine" class="mytd"></asp:TextBox></td>
				</tr>
			</asp:Panel>

			<asp:Panel ID="pnlAddtion" runat="server">
			
			<tr>
				<td colspan="6" style="background-color:Gray">处理信息</td>
			</tr>
			
			<asp:Repeater ID="Repeater1" runat="server" DataSourceID="EntityDataSource1" 
				visible='<% #bool.Parse((Repeater1.Items.Count==0).ToString()) %>' >
			   <HeaderTemplate>					
					<tr>
						<td><b>处理部门</b></td>
						<td><b>处理人</b></td>
						<td colspan="3"><b>处理意见</b></td>
						<td><b>处理时间</b></td>
					</tr>
			   </HeaderTemplate>
			   <ItemTemplate>
					<tr>
						<td >
						<asp:Label runat="server" ID="Label1" Text='<%# Eval("processerDepart") %>' />
						</td>
						<td >
						<asp:Label runat="server" ID="Label2" Text='<%# Eval("processerName") %>' />
						</td>
						<td colspan="3">
						<asp:Label runat="server" ID="Label5" Text='<%# Eval("opinion") %>' />
						</td>
						<td >
						<asp:Label runat="server" ID="Label6" Text='<%# Eval("processingDate", "{0:yyyy/MM/dd}") %>' />
						</td>
					</tr>
				</ItemTemplate>					  
				<FooterTemplate>
			   </FooterTemplate>
			   </asp:Repeater> 
			<asp:Panel ID="pnlProInfo" runat="server" Visible = "false">            
				<tr>
					<td><asp:TextBox ID="txtProDept" runat="server"></asp:TextBox></td>
					<td><asp:TextBox ID="txtProName" runat="server"></asp:TextBox></td>
					<td colspan="3" ><asp:TextBox ID="txtProOpn" runat="server"></asp:TextBox></td>
					<td><asp:TextBox ID="txtProDate" runat="server" cssclass="Wdate" 
						onClick="WdatePicker()"></asp:TextBox></td>
				</tr>
			</asp:Panel>
			</asp:Panel>
		</table>
 
		<div style="text-align:center;" class="btnCtrls">
			<asp:Button ID="btnRollback" runat="server" Text="回 退" 
				onclick="btnRollback_Click" />
			<asp:Button ID="btnRegist" runat="server" Text="登 记" 
				onclick="btnRegist_Click" OnClientClick="return checkTime()" />
			<asp:Button ID="btnDistribute" runat="server" Text="分 发" 
				onclick="btnDistribute_Click" OnClientClick="return checkTime()"/>
			<asp:Button ID="btnInsertProinfo" runat="server" Text="处 理" 
				onclick="btnInsertProinfo_Click" OnClientClick="return checkDate()"/>
			<asp:Button ID="btnEvaluate" runat="server" Text="评 价" 
				onclick="btnEvaluate_Click"/>
			<asp:Button ID="btnInfoSub" runat="server" Text="归 档"  
				onclick="btnInfoSub_Click" />
		</div> 

		
			
			<asp:Repeater ID="attatch" runat="server" OnItemCommand="OnItemCommand">
				<HeaderTemplate>
					<table>
				</HeaderTemplate>
				<ItemTemplate>
					<tr>
						<td>
							<asp:TextBox ID="attatchName" ReadOnly="true" Text='<%#DataBinder.Eval(Container.DataItem, "Name") %>'
								runat="server"></asp:TextBox>
						</td>
						<td>
							<asp:Button ID="d1" Text="删除" runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Name") %>'
								CommandName="delete" OnClientClick="return confirm('确定要删除？');" />
						</td>
						<td>
							<asp:Button ID="d2" Text="下载" runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Name") %>'
								CommandName="download" />
						</td>
					</tr>
				</ItemTemplate>
				<FooterTemplate>
					</table>
				</FooterTemplate>
			</asp:Repeater>
			<asp:Panel ID="Panel2" runat="server">

			<asp:Panel ID="Panel1" runat="server">
			<table id="Table1" class="table_bt" runat="server" cellpadding="2" cellspacing="1" >
				<tr class="noline">
					<td>
						<input id="Button_add_fj" onclick="return additem('TABLE_D')" type="button" value="继续添加附件"
							class="btn_big" style="height: 20px; width: 60px" />
					</td>
				</tr>
			</table>
			</asp:Panel>
			<input type="hidden" id="hidden" runat="server" value="1" />
            <table id="TABLE_D" border="0" cellspacing="0" cellpadding="0" width="100%">
            	
				<tr>
					<td>
						<input id="FileUploadD1" type="file" size="40" cssclass="a_search" runat="server" />
					</td>
					<td>
						<input onclick="return deleteitem(this);" type="button" value="删除" style="width:120px" />
					</td>
				</tr>
			</table>
			</asp:Panel>
	</div>

	<div>
		<asp:EntityDataSource ID="EntityDataSource1" runat="server" 
			ConnectionString="name=QuaManSysEntities" 
			DefaultContainerName="QuaManSysEntities" EnableFlattening="False" 
			EntitySetName="InnerQualityInfoPro" 
			Where="" AutoGenerateWhereClause="True" 
			
			Select="it.[processerName], it.[processerDepart], it.[processingDate], it.[opinion]" >
			<WhereParameters>
				<asp:ControlParameter ControlID="lblInfoNo" Name="qualityInfoId" 
					 Type="String" />
			</WhereParameters>
		</asp:EntityDataSource>	
	</div>
	
</asp:Content>
